<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息 - 智能客服</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/chat.css') }}">
    <link rel="stylesheet" href="{{ url_for("static", filename="bootstrap/bootstrap.4.6.min.css") }}">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container">
        <a class="navbar-brand" href="/chat">智能客服</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item ml-2">
                </li>
            </ul>
            <ul class="navbar-nav">
                {% if user %}
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for("main.profile") }}">{{ user.username }}</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for("main.logout") }}">退出登录</a>
                    </li>
                {% elif not user %}
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for("main.login") }}">登录</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for("main.register") }}">注册</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
<div class="container">
    <h1>个人信息</h1>
    <form action="{{ url_for('main.profile') }}" method="POST">
        <div class="profile-info">
            <div class="user-details">
                <label for="bio">头像：</label>
                <img src="{{ url_for('static', filename='img/user-avatar.jpg') }}" alt="User Avatar" class="avatar">
                <p>用户名: {{ user.username }}</p>
                <p>邮 箱: {{ user.email }}</p>
                <label for="bio">简介:</label>
                <textarea id="bio" name="bio" rows="4" cols="50" required>{{ user.bio }}</textarea>
            </div>
        </div>
        <div class="form-group">
            <button type="submit">保存更改</button>
        </div>
    </form>
</div>
</body>
</html>